﻿using System;
using ARS.Control.Custom.Entity.Fields;
using ARS.Control.Custom.Entity.Model;

namespace ARS.Fields
{
    /// <summary>
    /// </summary>
    [Serializable]
    public class fundinfo:EntityModel
    {
        public override ForeignKeyConfig GetConfig_ForeignKeyConfig()
        {
            ForeignKeyConfig foreignKeyConfig=new ForeignKeyConfig()
            {
                TableName = "fundinfo",
                KeyField = "FundInfo_Id",
                DataTextField = "FundName",
                DataValueField = "FundInfo_Id",
                FirstOptionValue = "0",
                FirstOptionText = "选择基金",
                StrWhere = "ParentId=0",
            };
            return foreignKeyConfig;
        }

        #region Model
        private int _fundinfo_id;
        private string _fundname;
        private string _fundcode;
        private decimal? _holdingtotal;
        private decimal? _holdingtotalmarketvalue;
        private string _risktype;
        private decimal? _pricewarning;
        private decimal? _openline;
        private decimal? _fundnet;
        private DateTime? _addtime;
        private int? _isdelete;
        private int? _userid;
        private string _remark;
        private int? _parentid;
        private string _productterm;
        private DateTime? _starttime;
        private DateTime? _endtime;
        private decimal? _entrustmoney;
        private decimal? _prioritymoney;
        private DateTime? _datestart;
        /// <summary>
        /// auto_increment
        /// </summary>
        [KeyField()]
        public int FundInfo_Id
        {
            set { _fundinfo_id = value; }
            get { return _fundinfo_id; }
        }
        /// <summary>
        /// 
        /// </summary>
        [CharField(Verbose_Name = "基金名称",IsListShow = true,IsAllowBlank = false,IsShow = true)]
        public string FundName
        {
            set { _fundname = value; }
            get { return _fundname; }
        }
        /// <summary>
        /// 
        /// </summary>
        //[CharField(Verbose_Name = "基金代码", IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public string FundCode
        {
            set { _fundcode = value; }
            get { return _fundcode; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DecimalField(Verbose_Name = "持股总量", IsListShow = true,  IsShow = true)]
        public decimal? HoldingTotal
        {
            set { _holdingtotal = value; }
            get { return _holdingtotal; }
        }
        /// <summary>
        /// 
        /// </summary>
        [FloatField(Verbose_Name = "持股总市值", IsListShow = true, IsShow = true)]
        public decimal? HoldingTotalMarketValue
        {
            set { _holdingtotalmarketvalue = value; }
            get { return _holdingtotalmarketvalue; }
        }
        /// <summary>
        /// 
        /// </summary>
        [ChoicesField(Verbose_Name = "风险类型", Choices = "low|无风险,mid|低风险,hi|高风险", IsListShow = true, IsShow = true)]
        public string RiskType
        {
            set { _risktype = value; }
            get { return _risktype; }
        }

        [FloatField(Verbose_Name = "比例预警", IsShow = true)]
        public int ProportionWarning { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [FloatField(Verbose_Name = "价格预警")]
        public decimal? PriceWarning
        {
            set { _pricewarning = value; }
            get { return _pricewarning; }
        }

        /// <summary>
        /// 
        /// </summary>
        //[FloatField(Verbose_Name = "基金净值")]
        public decimal? FundNet
        {
            set { _fundnet = value; }
            get { return _fundnet; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DateTimeField(Verbose_Name = "ss")]
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [HiddenInputField(Verbose_Name = "",DefaultValue = "0")]
        public int? IsDelete
        {
            set { _isdelete = value; }
            get { return _isdelete; }
        }
        /// <summary>
        /// 
        /// </summary>
        //[UserField(Verbose_Name = "")]
        public int? UserId
        {
            set { _userid = value; }
            get { return _userid; }
        }
        /// <summary>
        /// 
        /// </summary>
        [CharField(Verbose_Name = "备注")]
        public string Remark
        {
            set { _remark = value; }
            get { return _remark; }
        }
        /// <summary>
        /// 
        /// </summary>
        //[ForeignKeyField(Verbose_Name = "上级")]
        [HiddenInputField(DefaultValue = "0")]
        public fundinfo ParentId { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [CharField(Verbose_Name = "产品期限", IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public string ProductTerm
        {
            set { _productterm = value; }
            get { return _productterm; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DateTimeField(Verbose_Name = "开始时间", DateTimeFormat = DateTimeField.DATEFORMAT, IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public DateTime? StartTime
        {
            set { _starttime = value; }
            get { return _starttime; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DateTimeField(Verbose_Name = "结束时间", DateTimeFormat = DateTimeField.DATEFORMAT, IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public DateTime? EndTime
        {
            set { _endtime = value; }
            get { return _endtime; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DecimalField(Verbose_Name = "次级委托金额", IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public decimal? EntrustMoney
        {
            set { _entrustmoney = value; }
            get { return _entrustmoney; }
        }
        /// <summary>
        /// 
        /// </summary>
        [DecimalField(Verbose_Name = "优先级委托金额", IsListShow = true, IsAllowBlank = false, IsShow = true)]
        public decimal? PriorityMoney
        {
            set { _prioritymoney = value; }
            get { return _prioritymoney; }
        }
        /// <summary>
        /// 
        /// </summary>
       [DateTimeField(Verbose_Name = "产品成立日期", DateTimeFormat = DateTimeField.DATEFORMAT, IsListShow = true,  IsShow = true)]
        public DateTime? DateStart
        {
            set { _datestart = value; }
            get { return _datestart; }
        }
       /// <summary>
       /// 
       /// </summary>
       [FloatField(Verbose_Name = "平仓线", IsListShow = true, IsShow = true)]
       public decimal? OpenLine
       {
           set { _openline = value; }
           get { return _openline; }
       }
        #endregion Model


    }
}

